List-1 Extended 'FOND' resource structure _________________________________________________________________________________ t h e S t r u c t u r e o f e x t e n d e d F O N D f o r Vertical character mapping _________________________________________________________________________________ ///////// Imaginary structure definition //////////////////////////////////////// typedef int8 (8 bit signed integer) typedef uint8 (8 bit unsigned integer) typedef int16 (16 bit signed integer) typedef uint16 (16 bit unsigned integer) typedef int32 (32 bit signed integer) typedef uint32 (32 bit unsigned integer) struct FOND { uint16 flags; // flags for this family int16 familyID; // family ID number uint16 firstChar; // first character in font uint16 lastChar; // last character in font int16 ascent; // maximum Ascent expressed for 1 pt. int16 descent; // maximum Descent expressed for 1 pt. int16 leading; // maximum Leading expressed for 1 pt. int16 widthMax; // maximum MaxWidth expressed for 1 pt. uint32 offsetToWidTab; // offset to width table uint32 offsetToKernTab; // offset to kerning table uint32 offsetToStyleTab; // offset to Style Mapping Table uint16 property[9]; // contains style property info uint32 offsetToAddtionalTable; // offset to additional data table // (reserved for internatioal) uint16 version; // version uint16 numAssocTable; // number of association tables struct assocTable { // font association table uint16 size; // font size uint16 style; // font style uint16 resourceID; // font resource ID } [numAssocTable]; • • • AdditionalTableDirectory: struct additionalTableDirectory { // additional table directory uint32 version; // version of this table uint16 numTables; // number of tables uint16 searchRange; // search range uint16 entrySelector; // entry selector uint16 rangeShift; // range shift value struct tableDirectory { // table directories uint32 tag; // 4-byte identifier uint32 checkSum; // check sum for this table uint32 offset; // offset from beginning of // additional table directory uint32 length; // length of this table } [numTables]; }; • • • VerCharShift: uint32 verticalShiftValue; // $500 for 10ku shift and $6A00 for 84Ku shift encoding
///////// Descriptions for this structure /////////////////////////////////////// <<< Additional table directory >>> This new structure looks exactly like a table directory in the beginning of a 'sfnt' resource. • version, numTables, searchRange, entrySelector and rangeShift See the TrueType™ Font Format Specification. • Table directory entry for vertical character encoding A tag of vertical character encoding information in the table directory entry is 'tate'. • The shift value are used to calculate the vertical character's Shift-JIS code from horizontal character's Shift-JIS code. For example, $8141 + $500 = $8641 // 1 Ku 2 Ten --> 11 Ku 2 Ten for 10Ku shift. $8141 + $6A00 = $EB41 // 1 Ku 2 Ten --> 85 Ku 2 ten for 84Ku Shift. • If this table tag is not found, then the vertical characters can be assumed to be at 10ku shift position. However, the font may not have vertical characters at all (such as Tohaba fonts). The same applies when the field "offsetToAddtionalTable" has zero as the offset.